home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / andere sprachen / perl5 / perl5.002 / x2p / makefile < prev    next >
Encoding:
Makefile  |  1996-03-26  |  2.3 KB  |  113 lines

  1. # $RCSfile: Makefile.SH,v 2177240Revision: 4.1 2177240Date: 92/08/07 18:29:07 $
  2. #
  3. # $Log:    Makefile.SH,v $
  4.  
  5. CC = gcc
  6. BYACC = byacc
  7. LDFLAGS = -s
  8. SMALL = 
  9. LARGE =  
  10. mallocsrc = 
  11. mallocobj = 
  12. shellflags = 
  13.  
  14. libs = -lnet -lgdbm -lsdbm -lm -lc
  15.  
  16. CCCMD = `sh $(shellflags) cflags $@`
  17.  
  18. public = a2p s2p find2perl
  19.  
  20. private = 
  21.  
  22. manpages = a2p.man s2p.man
  23.  
  24. util =
  25.  
  26. sh = Makefile.SH cflags.SH
  27. shextract = Makefile cflags
  28.  
  29. pl = find2perl.PL s2p.PL
  30. plextract = find2perl s2p
  31.  
  32. addedbyconf = $(shextract) $(plextract)
  33.  
  34. h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h
  35.  
  36. c = hash.c $(mallocsrc) str.c util.c walk.c
  37.  
  38. obj = hash.o $(mallocobj) str.o util.o walk.o
  39.  
  40. lintflags = -phbvxac
  41.  
  42. # grrr
  43. SHELL = /bin/sh
  44.  
  45. .c.o:
  46.     $(CCCMD) $*.c
  47.  
  48. all: $(public) $(private) $(util)
  49.     touch all
  50.  
  51. a2p: $(obj) a2p.o
  52.     $(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
  53.  
  54. # I now supply a2p.c with the kits, so the following section is
  55. # used only if you force byacc to run by saying
  56. # make  run_byacc
  57.  
  58. run_byacc:    FORCE
  59.     @ echo Expect many shift/reduce and reduce/reduce conflicts
  60.     $(BYACC) a2p.y
  61.     mv y.tab.c a2p.c
  62.  
  63. # We don't want to regenerate a2p.c, but it might appear out-of-date
  64. # after a patch is applied or a new distribution is made.
  65. a2p.c: a2p.y
  66.     -@touch a2p.c
  67.  
  68. a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
  69.     $(CCCMD) $(LARGE) a2p.c
  70.  
  71. clean:
  72.     rm -f a2p *.o
  73.  
  74. realclean: clean
  75.     rm -f *.orig core $(addedbyconf) all malloc.c
  76.     rm -f GNUmakefile GNUmakefile.old
  77.  
  78. # The following lint has practically everything turned on.  Unfortunately,
  79. # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  80. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  81. # for that spot.
  82.  
  83. lint:
  84.     lint $(lintflags) $(defs) $(c) > a2p.fuzz
  85.  
  86. depend: $(mallocsrc) ../makedepend
  87.     ../makedepend
  88.  
  89. clist:
  90.     echo $(c) | tr ' ' '\012' >.clist
  91.  
  92. hlist:
  93.     echo $(h) | tr ' ' '\012' >.hlist
  94.  
  95. shlist:
  96.     echo $(sh) | tr ' ' '\012' >.shlist
  97.  
  98. # These should be automatically generated
  99.  
  100. $(plextract):
  101.     ../miniperl -I../lib $@.PL
  102.  
  103. malloc.c: ../malloc.c
  104.     rm -f malloc.c
  105.     sed <../malloc.c >malloc.c \
  106.         -e 's/"perl.h"/"..\/perl.h"/' \
  107.         -e 's/my_exit/exit/'
  108.  
  109. # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  110. $(obj):
  111.     @ echo "You haven't done a "'"make depend" yet!'; exit 1
  112. makedepend: depend
  113.